package com.xyz.rok.tools.exception;

import com.xyz.rok.tools.constant.SystemCode;

/**
 * @author ZhangYiXin
 * @version 1.0
 * @date 2021/5/28 10:37
 **/
public class UserException extends Exception {
    private SystemCode systemCode;

    public UserException(SystemCode systemCode) {
        super(systemCode.getMessage());
        this.systemCode = systemCode;
    }

    public SystemCode getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(SystemCode systemCode) {
        this.systemCode = systemCode;
    }

    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
